package com.ihr360.excel.service;

import com.ihr360.commons.vo.ResultInfo;
import com.ihr360.excel.model.type.JournalType;
import com.ihr360.excel.vo.ImportResult;
import com.ihr360.excel.vo.ProgressContext;
import com.ihr360.excel.vo.ProgressResult;

public interface ExcelService {


    void doHandleExcelFileProcess(ProgressContext progressContext);

    /**
     * 保存excel处理过程中的日志
     *
     * @param errorMsg
     */
    void saveExcelProcessorJournal(ProgressContext progressContext, String errorMsg);

    void saveExcelProcessorJournal(ProgressContext progressContext, String errorMsg,String msgKey,Object[] args,JournalType journalType);


    /**
     * 获取进度,如果进度结束（100%），查询是否有错误日志
     *
     * @param progressContext
     * @return
     */
    ProgressResult getProgressResult(ProgressContext progressContext);

    /**
     * 获取正确的结果集
     *
     * @param progressContext
     * @return
     */
    ImportResult getImportResult(ProgressContext progressContext);

    /**
     * 中断进程
     * @param progressContext
     * @return
     */
    ResultInfo interruptProgress(ProgressContext progressContext);

    /**
     * 获取错误文件Id
     * @param progressContext
     * @return
     */
    String getErrorFileId(ProgressContext progressContext);
}
